[mirrors]
http://ftp.postgresql.org/pub/source/v9.4.7/postgresql-9.4.7.tar.bz2

[vars]
filesize=17746987
sha512=e61d74a4a9caeb7d4a3fb9509b37aaeb5bd563d61d20739edd777ec990c92011286a7485f275178f9f8c1ebb8c84a98290e2b5351b11e0f9a1baa781f323e374
desc="professional SQL database server and interface libraries"
uchkurl=http://ftp.postgresql.org/pub/source/

[deps.host]
python

[deps]
libressl
libxml2
libxslt
readline
timezones

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine) \
  --with-sysroot=$butch_root_dir --with-system-tzdata="$butch_prefix"/etc/zoneinfo"

CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
./configure -C --prefix="$butch_prefix" $xconfflags \
  --enable-thread-safety \
  --docdir="$butch_prefix"/share/doc/postgresql \
  --mandir="$butch_prefix"/share/man
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

IS="$K"/bin/butch-install-service
"$IS" --down --log --force postgres "$K"/services/postgres
